package thinking.in.spring.boot.samples.ienable.beandefinitionRegistrar;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import thinking.in.spring.boot.samples.ienable.selctor.Server;

@Configuration
@EnableServer(type = Server.Type.FTP)
public class EnableServerBootstarp {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.register(EnableServerBootstarp.class);
        context.refresh();

        Server bean = context.getBean(Server.class);

        bean.start();

        bean.start();

        context.close();

    }
}
